app.controller('confirmBox', function($element, ngDialog ,$scope, $state, rest, user,uploadConf,tipService,uiLoad,$localStorage) {
    var data = angular.copy($scope.ngDialogData, {});
    console.log(data);
    $scope.params = {
      landlordId: user.get('landlordId')
    };
    $scope.reason = data.refusedReason;
    $scope.id = data.contractId;
    
    //点击确定按钮
    $scope.modifySure = function() {
      console.log(data);
      $scope.closeThisDialog({clickOk: true});
      rest.post({
          methodId: '1049',
          data: {'id': $scope.id},
          success: function(res) {
              if (res.code == 0) {
                  tipService.show("body", {
                      message: "月付提交成功,跳转中......"
                  }, 3);
              } else {
                  tipService.show("body", {
                      message: res.res.msg,
                      notice: "danger"
                  }, 3);
              }
          },
          error: function() {
              btn.removeClass('disabled');
          }
      })
    }

});